cmake_minimum_required(VERSION 3.12)
project(linux_c C)

set(CMAKE_C_STANDARD 99)
aux_source_directory(src DIR_SRC) # 源文件目录(当前目录设置到变量DIR_SRC)
aux_source_directory(src/io DIR_IO)
aux_source_directory(src/std_io DIR_STD_IO)
aux_source_directory(src/advance_io DIR_ADVANCE_IO)
aux_source_directory(src/github DIR_GITHUB)
aux_source_directory(src/process DIR_PROCESS)
aux_source_directory(src/file DIR_FILE)
aux_source_directory(src/dir DIR_DIR)
aux_source_directory(src/signal DIR_SIGNAL)
aux_source_directory(src/thread DIR_THREAD)
aux_source_directory(src/socket DIR_SOCKET)
aux_source_directory(src/epoll DIR_EPOLL)
add_executable(linux_c ${DIR_SRC}
        ${DIR_IO}
        ${DIR_STD_IO}
        ${DIR_ADVANCE_IO}
        ${DIR_GITHUB}
        ${DIR_PROCESS}
        ${DIR_FILE}
        ${DIR_SIGNAL}
        ${DIR_DIR}
        ${DIR_THREAD}
        ${DIR_SOCKET}
        ${DIR_EPOLL}
        ${DIR_CSTL}
        )
find_package(Threads)

target_link_libraries (${PROJECT_NAME} ${CMAKE_THREAD_LIBS_INIT} ${CSTL_LIBRARY})